package promogui;

import java.util.ArrayList;

//class Engineer {};
//class WeeklyProjectData {};

@SuppressWarnings("unused")
public class Project
{
	private ArrayList<WeeklyProjectData> weeksEstimatedData;
	private ArrayList<WeeklyProjectData> weeksCostData;
	private ArrayList<WeeklyProjectData> weeksTotalData;
   
   private ArrayList<WeeklyProductData> weeksProductData;
	
	
	private ArrayList<Engineer> engineers;
	private String projectName;
	
	
	
	public Project(String projectName)
	{
		this.projectName = projectName;
		
		// weeks = new ArrayList<WeeklyProjectData>();
		engineers = new ArrayList<Engineer>();
	}
	
	public String getName()
	{	
		return this.projectName;	
	}
	
   public WeeklyProjectData getTotalWeeklyProjectData(int week)
   {
       if ( (week <= weeksTotalData.size()) && (week > 0))
       {
           return weeksTotalData.get(week - 1);
       }
       
       return new WeeklyProjectData(week);
   }
   
	public void setArrayListEstimated(ArrayList<WeeklyProjectData> list)
	{
		this.weeksEstimatedData = list;
	}
	
	public void setArrayListTotal(ArrayList<WeeklyProjectData> list)
	{
		this.weeksTotalData = list;
	}
	
	public void setArrayListCosts(ArrayList<WeeklyProjectData> list)
	{
		this.weeksCostData = list;
	}
	
	public void setArrayListProductData(ArrayList<WeeklyProductData> list)
   {
       this.weeksProductData = list;
   }
	
   public ArrayList<Integer> getLinesOfCode()
   {
       ArrayList<Integer> linesOfCode = new ArrayList<Integer>();
       
       for (int i = 0; i < weeksProductData.size(); i++)
       {
           linesOfCode.add( weeksProductData.get(i).getLinesOfCode() );
       }
       
       return linesOfCode;
   }
	
   public ArrayList<Integer> getNumberOfBugs()
   {
       ArrayList<Integer> linesOfCode = new ArrayList<Integer>();
       
       for (int i = 0; i < weeksProductData.size(); i++)
       {
           linesOfCode.add( weeksProductData.get(i).getNumberOfBugs() );
       }
       
       return linesOfCode;
   }
   
   public ArrayList<Integer> getNumberOfComponents()
   {
       ArrayList<Integer> linesOfCode = new ArrayList<Integer>();
       
       for (int i = 0; i < weeksProductData.size(); i++)
       {
           linesOfCode.add( weeksProductData.get(i).getNumberOfComponents() );
       }
       
       return linesOfCode;
   }
   
   public ArrayList<Integer> getNumberOfTasks()
   {
       ArrayList<Integer> linesOfCode = new ArrayList<Integer>();
       
       for (int i = 0; i < weeksProductData.size(); i++)
       {
           linesOfCode.add( weeksProductData.get(i).getNumberOfTasks() );
       }
       
       return linesOfCode;
   }
   
   public ArrayList<Integer> getNumberOfTestCases()
   {
       ArrayList<Integer> linesOfCode = new ArrayList<Integer>();
       
       for (int i = 0; i < weeksProductData.size(); i++)
       {
           linesOfCode.add( weeksProductData.get(i).getNumberOfTestCases() );
       }
       
       return linesOfCode;
   }
   
   public ArrayList<Integer> getPercentageOfCodeCoverage()
   {
       ArrayList<Integer> linesOfCode = new ArrayList<Integer>();
       
       for (int i = 0; i < weeksProductData.size(); i++)
       {
           linesOfCode.add( weeksProductData.get(i).getPercentageOfCodeCoverage() );
       }
       
       return linesOfCode;
   }
   
   public ArrayList<Integer> getPercentageOfSuccessfulTests()
   {
       ArrayList<Integer> linesOfCode = new ArrayList<Integer>();
       
       for (int i = 0; i < weeksProductData.size(); i++)
       {
           linesOfCode.add( weeksProductData.get(i).getPercentageOfSuccessfulTests() );
       }
       
       return linesOfCode;
   }
   
	public int getCurrentWeek()
	{
		return weeksTotalData.size();
	}
	
   public int getProductDataCurrentWeek()
   {
       return weeksProductData.size();
   }
   
	public float getCurrentTotalEstimated()
	{
		int currentWeek = getCurrentWeek();
		
		float total = 0;
		for (int i = 0; i < currentWeek; i++)
		{
			total += weeksEstimatedData.get(i).getTotalRE();
			total += weeksEstimatedData.get(i).getTotalAD();
			total += weeksEstimatedData.get(i).getTotalII();
			total += weeksEstimatedData.get(i).getTotalBT();
			total += weeksEstimatedData.get(i).getTotalPM();
				
		}
		return total;
	}
	
	public float getWorkedPercent()
	{
		float currentEstimated = getCurrentTotalEstimated();
		float currentWorked = getTotalWorked();
		float totalEstimated = getTotalEstimated();
		
		return 100 - ((currentEstimated - currentWorked) / totalEstimated) * 100;
	}
	
	
	public void addEngineer(Engineer engineer)
	{
		this.engineers.add(engineer);
	}
	
	
	public float getTotalCostsRE()
	{
		float total = 0;
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total += weeksCostData.get(i).getTotalRE();
				
		}
		return total;
	}
	
	public float getTotalEstimatedRE()
	{
		float total = 0;
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total += weeksEstimatedData.get(i).getTotalRE();
				
		}
		return total;
	}
	
	public float getTotalWorkedRE()
	{
		float total = 0;
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total += weeksTotalData.get(i).getTotalRE();
				
		}
		return total;
	}
	
	public float getTotalCostsII()
	{
		float total = 0;
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total += weeksCostData.get(i).getTotalII();
				
		}
		return total;
	}
	
	public float getTotalEstimatedII()
	{
		float total = 0;
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total += weeksEstimatedData.get(i).getTotalII();
				
		}
		return total;
	}
	
	public float getTotalWorkedII()
	{
		float total = 0;
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total += weeksTotalData.get(i).getTotalII();
				
		}
		return total;
	}
	public float getTotalCostsPM()
	{
		float total = 0;
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total += weeksCostData.get(i).getTotalPM();
				
		}
		return total;
	}
	
	public float getTotalEstimatedPM()
	{
		float total = 0;
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total += weeksEstimatedData.get(i).getTotalPM();
				
		}
		return total;
	}
	
	public float getTotalWorkedPM()
	{
		float total = 0;
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total += weeksTotalData.get(i).getTotalPM();
				
		}
		return total;
	}
	public float getTotalCostsAD()
	{
		float total = 0;
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total += weeksCostData.get(i).getTotalAD();
				
		}
		return total;
	}
	
	public float getTotalEstimatedAD()
	{
		float total = 0;
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total += weeksEstimatedData.get(i).getTotalAD();
				
		}
		return total;
	}
	
	public float getTotalWorkedAD()
	{
		float total = 0;
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total += weeksTotalData.get(i).getTotalAD();
				
		}
		return total;
	}
	public float getTotalCostsBT()
	{
		float total = 0;
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total += weeksCostData.get(i).getTotalBT();
				
		}
		return total;
	}
	
	public float getTotalEstimatedBT()
	{
		float total = 0;
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total += weeksEstimatedData.get(i).getTotalBT();
				
		}
		return total;
	}
	
	public float getTotalWorkedBT()
	{
		float total = 0;
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total += weeksTotalData.get(i).getTotalBT();
				
		}
		return total;
	}

	public float getTotalWorked()
	{
		return getTotalWorkedAD()+getTotalWorkedBT()+getTotalWorkedII()+getTotalWorkedPM()+getTotalWorkedRE();
	}
	
	public float getTotalCosts()
	{
		return getTotalCostsAD()+getTotalCostsBT()+getTotalCostsII()+getTotalCostsPM()+getTotalCostsRE();
	}
	
	public float getTotalEstimated()
	{
		return getTotalEstimatedAD()+getTotalEstimatedBT()+getTotalEstimatedII()+getTotalEstimatedPM()+getTotalEstimatedRE();
	}
	
   public WeeklyEngineerData getTotalWeeklyEngineerData(int week, Engineer engineer)
   {
       if (week <= weeksTotalData.size())
       {
           return weeksTotalData.get(week - 1).getWeeklyEngineerDataByEngineer(engineer);
       }
       else
       {
           return new WeeklyEngineerData(engineer);
       }
   }
   
   public Engineer getEngineerForEstimatedValues()
   {
       if (weeksEstimatedData.size() > 0)
       {
           return weeksEstimatedData.get(0).getFirstEngineer();
       }
        
       return new Engineer("VOID");
   }
   
   public WeeklyEngineerData getEstimatedWeeklyEngineerData(int week)
   {
       if (week <= weeksEstimatedData.size())
       {
           return weeksEstimatedData.get(week - 1).getWeeklyEngineerDataByEngineer(getEngineerForEstimatedValues());
       }
       else
       {
           return new WeeklyEngineerData(new Engineer("VOID"));
       }
   }
   
   public void setEstimatedWeeklyEngineerData(int week, WeeklyEngineerData data)
   {
       if (weeksEstimatedData.size() <= week)
       {
           weeksEstimatedData.get(week -1).addWeeklyEngineerData(data);
       }
   }
   
   public void addEstimatedWeeklyEngineerData(WeeklyEngineerData data)
   {
       int week = getNumberOfPlannedWeeks() + 1;
       
       WeeklyProjectData weeklyData = new WeeklyProjectData(week);
       weeklyData.addWeeklyEngineerData(data);
       weeksEstimatedData.add(weeklyData);
   }
   
   public boolean removeLastEstimatedWeek()
   {
       if (weeksEstimatedData.size() > getCurrentWeek())
       {
           weeksEstimatedData.remove(weeksEstimatedData.size() - 1);
           return true;
       }
       
       return false;
   }
   
    public void setWeeklyEngineerData(int week, WeeklyEngineerData data)
    {
        if (week <= weeksTotalData.size())
        {
            weeksTotalData.get(week - 1).addWeeklyEngineerData(data);
        }
        else
        {
            WeeklyProjectData projectData = new WeeklyProjectData(week);
            projectData.addWeeklyEngineerData(data);
            weeksTotalData.add(projectData);
        }
    }
            
        
        
        
        
        public ArrayList<Float> getWeekwiseCostsRE()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total.add(weeksCostData.get(i).getTotalRE());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseEstimatedRE()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total.add(weeksEstimatedData.get(i).getTotalRE());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseWorkedRE()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total.add(weeksTotalData.get(i).getTotalRE());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseCostsII()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total.add(weeksCostData.get(i).getTotalII());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseEstimatedII()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total.add(weeksEstimatedData.get(i).getTotalII());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseWorkedII()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total.add(weeksTotalData.get(i).getTotalII());
				
		}
		return total;
	}
	public ArrayList<Float> getWeekwiseCostsPM()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total.add(weeksCostData.get(i).getTotalPM());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseEstimatedPM()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total.add(weeksEstimatedData.get(i).getTotalPM());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseWorkedPM()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total.add(weeksTotalData.get(i).getTotalPM());
				
		}
		return total;
	}
	public ArrayList<Float> getWeekwiseCostsAD()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total.add(weeksCostData.get(i).getTotalAD());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseEstimatedAD()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total.add(weeksEstimatedData.get(i).getTotalAD());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseWorkedAD()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total.add(weeksTotalData.get(i).getTotalAD());
				
		}
		return total;
	}
	public ArrayList<Float> getWeekwiseCostsBT()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			total.add(weeksCostData.get(i).getTotalBT());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseEstimatedBT()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			total.add(weeksEstimatedData.get(i).getTotalBT());
				
		}
		return total;
	}
	
	public ArrayList<Float> getWeekwiseWorkedBT()
	{
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			total.add(weeksTotalData.get(i).getTotalBT());
				
		}
		return total;
	}
        
        










// ---------------------------------------------------------------------------------


// ---------------------------------------------------------------------------------






        
        public ArrayList<Float> getEvolutionalCostsRE()
	{
		ArrayList<Float> total = new ArrayList<Float>();
                float totalNow = 0;
                
		for (int i = 0; i < weeksCostData.size(); i++)
		{       
                        totalNow += weeksCostData.get(i).getTotalRE();
			total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalEstimatedRE()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			totalNow += weeksEstimatedData.get(i).getTotalRE();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalWorkedRE()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			totalNow += weeksTotalData.get(i).getTotalRE();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalCostsII()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			totalNow +=weeksCostData.get(i).getTotalII();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalEstimatedII()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			totalNow += weeksEstimatedData.get(i).getTotalII();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalWorkedII()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			totalNow +=weeksTotalData.get(i).getTotalII();
                        total.add(totalNow);
				
		}
		return total;
	}
	public ArrayList<Float> getEvolutionalCostsPM()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			totalNow += weeksCostData.get(i).getTotalPM();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalEstimatedPM()
	{
            
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			totalNow +=weeksEstimatedData.get(i).getTotalPM();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalWorkedPM()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			totalNow += weeksTotalData.get(i).getTotalPM();
                        total.add(totalNow);
				
		}
		return total;
	}
	public ArrayList<Float> getEvolutionalCostsAD()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			totalNow += weeksCostData.get(i).getTotalAD();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalEstimatedAD()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			totalNow += weeksEstimatedData.get(i).getTotalAD();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalWorkedAD()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			totalNow += weeksTotalData.get(i).getTotalAD();
                        total.add(totalNow);
				
		}
		return total;
	}
	public ArrayList<Float> getEvolutionalCostsBT()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			totalNow += weeksCostData.get(i).getTotalBT();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalEstimatedBT()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			totalNow += weeksEstimatedData.get(i).getTotalBT();
                        total.add(totalNow);
				
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalWorkedBT()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			totalNow += weeksTotalData.get(i).getTotalBT();
                        total.add(totalNow);
				
		}
		return total;
	}
        
        
   public ArrayList<Float> getEvolutionalCosts()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksCostData.size(); i++)
		{
			totalNow += weeksCostData.get(i).getTotalHours();
			total.add(totalNow);
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalEstimated()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksEstimatedData.size(); i++)
		{
			totalNow += weeksEstimatedData.get(i).getTotalHours();
			total.add(totalNow);
		}
		return total;
	}
	
	public ArrayList<Float> getEvolutionalWorked()
	{
            float totalNow = 0;
		ArrayList<Float> total = new ArrayList<Float>();
		for (int i = 0; i < weeksTotalData.size(); i++)
		{
			totalNow += weeksTotalData.get(i).getTotalHours();
                        total.add(totalNow);
		}
		return total;
	}
   
   public int getNumberOfPlannedWeeks()
   {
       return weeksEstimatedData.size();
   }
   
   public int getCurrentWeekOfEngineer(Engineer engineer)
   {
       for (int i = weeksTotalData.size() -1; i >= 0; i--)
       {
           if (weeksTotalData.get(i).hasEngineerData(engineer))
           {
               // index + 1 => week no.
               return i + 1;
           }
       }
       
       return 0;
   }
   
   public boolean hasEstimatedEngineerData(Engineer engineer)
   {
       if (weeksEstimatedData.size() > 0)
       {
           if (weeksEstimatedData.get(0).hasEngineerData(engineer))
           {
               return true;
           }
       }
       
       return false; 
   }
        
   public boolean removeCurrentEngineerData(Engineer engineer)
   {
       int week = getCurrentWeekOfEngineer(engineer);
       boolean removed = false;
       
        if (week - 1 >= 0)
        {
            WeeklyProjectData data = weeksTotalData.get(week - 1);
            removed = data.removeEngineerData(engineer);
        
            if (data.isEmpty())
            {
                weeksTotalData.remove(week - 1);
            }
       }
        
       return removed;
   }
   
   public boolean removeLastTotalWeek()
   {
       // method deactivated
       return false;
       
       // because BULLSHIT follows...
       /*
       if (weeksTotalData.size() >= 1)
       {
        weeksTotalData.remove(weeksTotalData.size() - 1);
        return true;
       }
       else
       {
           return false;
       }
        */
   }
        
   
   public ArrayList<Integer> getEvolutionalNumberOfComponents()
   {
   
       int totalNow = 0;
		ArrayList<Integer> total = new ArrayList<Integer>();
		for (int i = 0; i < weeksProductData.size(); i++)
		{
			totalNow += weeksProductData.get(i).getNumberOfComponents();
                        total.add(totalNow);
				
		}
		return total;
   }
   
   
     public ArrayList<Integer> getEvolutionalNumberOfTasks()
   {
              int totalNow = 0;
		ArrayList<Integer> total = new ArrayList<Integer>();
		for (int i = 0; i < weeksProductData.size(); i++)
		{
			totalNow += weeksProductData.get(i).getNumberOfTasks();
                        total.add(totalNow);
				
		}
		return total;
   
   }
   
   public ArrayList<Double> getEvolutionalPercentOfCodeCoverage()
   {
          double totalNow = 0;
		ArrayList<Double> total = new ArrayList<Double>();
		for (int i = 0; i < weeksProductData.size(); i++)
		{
			totalNow += weeksProductData.get(i).getPercentageOfCodeCoverage();
                        total.add(totalNow);
				
		}
		return total;
   
   }

   public ArrayList<Integer> getEvolutionalLOC()
   {
                 int totalNow = 0;
		ArrayList<Integer> total = new ArrayList<Integer>();
		for (int i = 0; i < weeksProductData.size(); i++)
		{
			totalNow += weeksProductData.get(i).getLinesOfCode();
                        total.add(totalNow);
				
		}
		return total;
   
   }
   
   public ArrayList<Integer> getEvolutionalNumberOfTestcases()
   {
   
                int totalNow = 0;
		ArrayList<Integer> total = new ArrayList<Integer>();
		for (int i = 0; i < weeksProductData.size(); i++)
		{
			totalNow += weeksProductData.get(i).getNumberOfTestCases();
                        total.add(totalNow);
				
		}
		return total;
   }
   
   
   public ArrayList<Integer> getEvolutionalNumberOfBugs()
   {
                int totalNow = 0;
		ArrayList<Integer> total = new ArrayList<Integer>();
		for (int i = 0; i < weeksProductData.size(); i++)
		{
			totalNow += weeksProductData.get(i).getNumberOfBugs();
                        total.add(totalNow);
				
		}
		return total;
   
   }
      public ArrayList<Double> getEvolutionalPercentageOfSuccessfullTests()
   {
           double totalNow = 0;
		ArrayList<Double> total = new ArrayList<Double>();
		for (int i = 0; i < weeksProductData.size(); i++)
		{
			totalNow += weeksProductData.get(i).getPercentageOfSuccessfulTests();
                        total.add(totalNow);
				
		}
		return total;
   
   
   }
    
    
}
